


<script>

	
	
	function removeListInfoCate(id,module){
		
		if(!confirm('确定要删除吗？')){
			return false;
		}
		
		
		$.post('{:U('Modules/removeListInfo')}',{
			'module':module,
			'news_id':
		
		id,'id':
		
		{$info.id}
		
		},
		function(data){
			if(data.status == 1){
				$('#news'+module+'_'+id).remove();
				
			}else{
				alert(data.info);
			}
			},'json'
		
		);
	}
	
	
	//删除列表数据
	function removeListInfo(id){
		
		if(!confirm('确定要删除吗？')){
			return false;
		}
		
		
		$.post('{:U('Modules/removeListInfo')}',{
			'module':2,
			'news_id':
		
		id,'id':
		
		{$info.id}
		
		},
		function(data){
			if(data.status == 1){
				$('#news_'+id).remove();
				
			}else{
				alert(data.info);
			}
			},'json'
		
		);
	}
	//排序列表
	function sortListInfo(type,e){
		if(type=='up'){
			$(e).parent().after($(e).parent().prev());
		}else{
			$(e).parent().next().after($(e).parent());
		}
		var data = new Array();
		$(e).parent().parent().children('li').each(function(index, element) {
            data.push($(this).attr('sortkey'));
			$(this).attr('sortkey',index);
        });
		/*$.post('{:U('sortListInfo')}',{
			'id':{$info.id},
			'sort':data.toString()
			},function(d){
			if(d.status == 0){
				alert(d.info);
			}
		},'json');*/
	}
	
	
	$(document).ready(function(e) {
		
		$('.stylelist .thumbnail').each(function(index, element) {
			$(this).click(function(e) {
                $('.stylelist .thumbnail').removeClass('on');
                $(this).addClass('on');
			    $('.stylelist .thumbnail').attr("disabled");
			    $(this).find('input').removeAttr("disabled");
				
				
            });
			
        });
		
		
		//设置模块边框
		$('.setBorderInput').each(function(index, element) {
            
			$(this).change(function(e) {
				var border = '';
                var type = $(this).parent().parent().parent().find('select:eq(0)').val();
				var width = $(this).parent().parent().parent().find('select:eq(1)').val(); 
				var color = $(this).parent().parent().parent().find('input:eq(1)').val();
				border = type + ' ' + width + ' ' + color + '';
				switch($(this).parent().parent().parent().find('input:eq(0)').attr('name')){
					case 'borderTop' : border = 'border-top:'+border;
					if(type == ''){
					    border = 'border-top:none';
				    } break;
					case 'borderRight' : border = 'border-right:'+border;
					if(type == ''){
					    border = 'border-right:none';
				    } break;
					case 'borderBottom' : border = 'border-bottom:'+border;
					if(type == ''){
					    border = 'border-bottom:none';
				    } break;
					case 'borderLeft' : border = 'border-left:'+border;
					if(type == ''){
					    border = 'border-left:none';
				    } break;
					
					
					case 'titleBorderTop' : border = 'border-top:'+border;
					if(type == ''){
					    border = 'border-top:none';
				    } break;
					case 'titleBorderRight' : border = 'border-right:'+border;
					if(type == ''){
					    border = 'border-right:none';
				    } break;
					case 'titleBorderBottom' : border = 'border-bottom:'+border;
					if(type == ''){
					    border = 'border-bottom:none';
				    } break;
					case 'titleBorderLeft' : border = 'border-left:'+border;
					if(type == ''){
					    border = 'border-left:none';
				    } break;
					
					
					
					default:break;
				}
				$(this).parent().parent().parent().find('input:eq(0)').val(border);
				
				
				$('#borderBox_').css($(this).parent().parent().parent().find('input:eq(0)').attr('name'),border.split(':')[1]);
				
            });
        });
		
		
		//色板
		$('.colorpicker').each(function(index, element) {
            $(this).colorpicker({
				fillcolor:true,
				success:function(o,color){
					//$(element).css("color",color);
					$(element).change();
					$(element).val(color);
				}
			});
        });
		//选项卡
		
		$('.optionBox').each(function(index, element) {
            if($(this).children('*').length == 0){
				$(this).remove();
			}
        });  
		
		
		$('.optionControl li').each(function(index, element) {
            $(this).click(function(e) {
                $('.optionBox').hide();
				$('.optionBox').eq(index).show();
				$('.optionControl li').removeClass('cur');$(this).addClass('cur');
				
            });
        });
		
        $(".checkoutformaddmodule").Validform({
			ajaxPost:true,
			tiptype:function(data,s){
				if(s.type == 1){
					$.ThinkBox.success('正在添加子模块',{'delayClose':200});
				}
			},
			callback:function(data){
				if(data.status == 0){
					$.ThinkBox.error(data.info,{'delayClose':200});
				}else{
					$('#subListBox').append('<div style="border:1px solid #ccc; width:100px; height:100px; margin:4px; float:left;"></div>');
				}
			}
	    });
    });
	function selectNews(id){
		art.dialog.data('news_ids',$('#news_ids'));
		art.dialog.open('{:U('News/selectNews',array('modules_id' => $info['id']))}', {width: 800, height: 500,lock:true,title:'选择图文', ok:function(){
			window.location.reload();
			
	    }});
	}
	
	function selectCategory(id){
		art.dialog.data('news_ids',$('#news_ids'));
		art.dialog.open('{:U('Category/selectCategory',array('modules_id' => $info['id']))}', {width: 800, height: 500,lock:true,title:'选择图文', ok:function(){
			window.location.reload();
			
	    }});
	}
	//复制样式
	function copystyleall(){
		$.post(
		'{:U('copystyle')}',
		{
			'id':'{$info.id}','all':1},
			
		function(data){
			if(data.status == 1){
				alert(data.info);
			}else{
		    	alert(data.info);
			}
		},
		'json'
		);
	}
	//复制样式
	function copystyle(){
		$.post(
		'{:U('copystyle')}',
		{
			'id':'{$info.id}'},
			
		function(data){
			if(data.status == 1){
				alert(data.info);
			}else{
		    	alert(data.info);
			}
		},
		'json'
		);
	}
	//粘贴样式
	function parsestyle(){
		$.post(
		'{:U('parsestyle')}',
		{
			'id':'{$info.id}'},
		function(data){
			if(data.status == 1){
				alert(data.info);
			}else{
		    	alert(data.info);
			}
		},
		'json'
		);
	}
	
	
	
	
  </script>
    <style>
	#replyList img{width:100px; height:40px;}
.clear{clear:both;}
.thumbnail .caption{padding:0;}
 	.subListBox form{float:left; margin:0 12px;}
	#colorpanel table{border:none;}
	#colorpanel td{padding:0px; border:none;}
	#colorpanel #CT{border-top:1px solid #fff; border-right:1px solid #fff;}
	#colorpanel #CT td{padding:0px; border-left:1px solid #fff; border-bottom:1px solid #fff;}
	#colorpanel input{padding:0px; border-radius:0px;}
	
	.optionBox{padding-bottom:40px;}
	.imgcatecontrol li{float:left;}
	.imgcatecontrol li a{display:block; padding:18px 12px;}
	.imgcatecontrol li a.cur{color:#f60; font-weight:bold; font-size:16px;}
	.optionControl{border-bottom:1px solid #ccc; margin-bottom:10px;}
	.optionControl li{float:left; border:1px solid #ccc; margin:0px 2px; position:relative; bottom:-1px; padding:8px;}
	.optionControl li.cur{border-bottom:1px solid #eee; }
	.input-group-addon{background:#DCDCDC;}

	
	
	.stylelist .on{border:3px solid #18B90C;}
 </style>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
    
    <form class="checkoutform form-horizontal" action="{:U('Admin/Modules/update')}" method="post">
      <input type="hidden" name="id" id="id" value="{$info.id}">
      <ul class="optionControl">
        <li class="cur"><a href="javascript:;">基本设置</a></li>
        
        <li><a href="javascript:;">高级设置</a></li>
        <notempty name="stylelist">
          <li><a href="javascript:;">系统样式</a></li>
        </notempty>
        <li><a href="javascript:;">标题设置</a></li>
        <?php if(in_array($info['type'],array(1,10,12,2,13))){?>
        
        
        
        <li id="datadisplay"><a href="javascript:;">显示数据</a></li>
        
        
        <script>
		    $('#datadisplay').trigger('click');
		</script>
        
        
        
        <?php }?><if condition="!empty($pasteList) || !empty($tsubList)">
        <li><a href="javascript:;">子模块</a></li>
        </if>
        <div class="clear"></div>
      </ul>
      <div class="optionBox">
      
      
      
      <div class="row">
          <div class="col-sm-6">
              <div class="form-group">
          <label class="col-sm-4 control-label">显示数据</label>
          <div class="col-sm-8">
            <select class="form-control" name="dataname">
              <option value="">请选择</option>
              <?php foreach(C('WEB_DATA') as $key => $vo){?>
              <option value="<?php echo $vo['name'];?>" 
                  <?php if($vo['name'] == $info['dataname']){?>selected="selected"<?php } ?>
                  ><?php echo $vo['remark'];?> </option>
              <?php }?>
              <?php foreach($category_list as $key => $vo){?>
              <option value="<?php echo $vo['name'];?>.list" 
                  <?php if($vo['name'] == $info['dataname']){?>selected="selected"<?php } ?>
                  >文章分类“<?php echo $vo['title'];?>”列表 </option>
              <?php foreach($vo['sub'] as $skey => $svo){?>
              <option value="<?php echo $svo['name'];?>.list" 
                  <?php if($svo['name'] == str_replace('.list','',$info['dataname'])){?>selected="selected"<?php } ?>
                  ><?php echo getdeepstr($svo['deep']);?>文章分类“<?php echo $svo['title'];?>”列表 </option>
              <?php }?>
              <?php }?>
            </select>
          </div>
        </div>
        
        
        
        
        <notempty name="pagesList">
          <div class="form-group">
            <label class="col-sm-4 control-label">引用页面</label>
            <div class="col-sm-8">
              <select class="form-control" name="import">
                <option value="">请选择</option>
                <?php foreach($pagesList as $key => $vo){?>
                <option value="<?php echo $vo['id'];?>" 
                  <?php if($vo['id'] == $info['import']){?>selected="selected"<?php } ?>
                  ><?php echo $vo['id'];?>:<?php echo $vo['title'];?> </option>
                <?php }?>
              </select>
            </div>
          </div>
        </notempty>
        
        
        
        
          </div>
          
          
          <div class="col-sm-6">
               <?php if(in_array($info['type'],array(1,2))){?>
        <div class="form-group">
          <label class="col-sm-4 control-label">缩略图类型</label>
          <div class="col-sm-8">
            <select class="form-control" name="thumbtype">
              <option value="1" 
              
              <eq name="info['thumbtype']" value="1">selected="selected"</eq>
              >填充比例（经系统填充空白的）
              
              </option>
              <option value="0" 
              
              <eq name="info['thumbtype']" value="0">selected="selected"</eq>
              >原比例（保留原有比例）
              
              </option>
              <option value="2" 
              
              <eq name="info['thumbtype']" value="2">selected="selected"</eq>
              >原图
              
              </option>
            </select>
          </div>
        </div>
        <?php }?>
        
        
        
        
        
        
        <eq name="info['type']" value="16">
          <div class="form-group">
            <label class="col-sm-4 control-label">表单</label>
            <div class="col-sm-8">
              <select class="form-control" name="form_id">
                <option value="">请选择</option>
                <?php foreach($formList as $key => $vo){?>
                <option value="<?php echo $vo['id'];?>" 
                  <?php if($vo['id'] == $info['form_id']){?>selected="selected"<?php } ?>
                  ><?php echo $vo['name'];?> </option>
                <?php }?>
              </select>
            </div>
          </div>
        </eq>
        
        
        
        
        
        
        
        <eq name="info['type']" value="13">
          <div class="form-group">
            <label class="col-sm-4 control-label">搜索框地址</label>
            <div class="col-sm-8">
              <input class="form-control" name="formAction" placeholder="搜索框地址" type="text" id="formAction" value="{$info.formAction}" />
            </div>
          </div>
        </eq>
        
        
        
        
        
        
          </div>
      </div>
      
      
      
      
      
      
      
      
      
      
      
      
      
      
        
        
        
        
        
       
        
        
        
        
         <div class="row">
          <div class="col-sm-6">
              <div class="form-group">
          <label class="col-sm-4 control-label">模块宽度【<a href="javascript:void(0);" onClick="$(this).parent().next().find('input').val('auto');">自动</a>】</label>
          <div class="col-sm-8">
            <input class="form-control" name="width" placeholder="宽" type="text" id="width" value="{$info.width}" />
          </div>
        </div>
        
        </div>
        <div class="col-sm-6">
              <div class="form-group">
          <label class="col-sm-4 control-label">模块高度【<a href="javascript:void(0);" onClick="$(this).parent().next().find('input').val('auto');">自动</a>】</label>
          <div class="col-sm-8">
            <input class="form-control" name="height" placeholder="高" type="text" id="height" value="{$info.height}" />
          </div>
        </div>
        
        </div>
        </div> 
        
        
        
        
        
        
        
        
        
        
        
        
      
          <!-- 百度地图设置 -->
          <eq name="info['type']" value="8">
            <style type="text/css">
	  
#l-map{height:300px;width:500px;float:left;border:1px solid #bcbcbc;}
#r-result{width:250px;float:right; height:300px; overflow-y:scroll;}

</style><div class="edit__"><html:editor id="editor" name="content" type="UEDIT" style="">{$info.content}</html:editor></div>
            <div class="demo">
                  <p style="height:40px;">输入城市：
                    <input id="txtCity" type="text"/>
                    <button type="button" onClick="getPoint()">获取坐标</button>
                    坐标：
                    <input id="txtPoint" value="{$info.baidupoint}" name="baidupoint" type="text"/>
                  </p>
                  <div id="l-map"></div>
                  <div id="r-result"></div>
                  
                  
                  
                  
                  <div class="clearfix"></div>
                  
                  
                  
                </div>
            <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=QMDvD2Anle2gLOINIBUZ1Lhh"></script> 
            <script type="text/javascript">
// 百度地图API功能  

var map = new BMap.Map("l-map");            // 创建Map实例
	map.centerAndZoom(new BMap.Point(113.342754,23.653305), 8);
	map.enableScrollWheelZoom();
	
	
	
	var point = new BMap.Point({$info.baidupoint});
	var marker = new BMap.Marker(point);  // 创建标注
	map.addOverlay(marker);
	
	var local = new BMap.LocalSearch("东莞", {
	  renderOptions: {
		map: map,
		panel : "r-result", 
		autoViewport: true, 
		selectFirstResult: false
	  }, 
	  onResultsHtmlSet:function(container){
		  $(container).find('li').each(function(index, element) {
			  $(this).click(function(e) {
                
				document.getElementById("txtPoint").value=local.getResults().getPoi(index).point.lng + "," + local.getResults().getPoi(index).point.lat; 
            });
             
        });
		  //alert(local.getResults().getNumPois());
	  
	  }  
	});
		map.addEventListener("click",function(e){
		
		document.getElementById("txtPoint").value=e.point.lng + "," + e.point.lat; 
	});
function getPoint(){ 
	 
    var city = document.getElementById("txtCity").value;
	local.search(city);                 // 初始化地图,设置城市和地图级别。
	                            //启用滚轮放大缩小

}

</script>
          
              
          </eq>
          
          <!-- 百度地图设置结束 --> 
          <!-- 栏目列表 -->
          <eq name="info['type']" value="12">
            <div class="row" style="margin-top:10px;">
              <div class="col-sm-6">
                <div class="input-group"> <span class="input-group-addon"> 标题字数 </span>
                  <input name="listTitleLength" type="text" id="listTitleLength" value="{$info.listTitleLength}" class="form-control" />
                </div>
              </div>
            </div>
            
            <!-- 栏目列表end --> 
            
          </eq>
          
          
          
          
          <eq name="info['type']" value="2">
            <div class="row">
              <div class="col-sm-6">
                <div class="form-group">
                  <label class="col-sm-4 control-label">标题字数</label>
                  <div class="col-sm-8">
                    <input name="listTitleLength" type="text" id="listTitleLength" value="{$info.listTitleLength}" class="form-control" />
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-sm-4 control-label">详情字数</label>
                  <div class="col-sm-8">
                    <input name="listContentLength" type="text" id="listContentLength" value="{$info.listContentLength}" class="form-control" />
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-sm-4 control-label">详情省略符</label>
                  <div class="col-sm-8">
                    <input name="listContentOut" type="text" id="listContentOut" value="{$info.listContentOut}" class="form-control" />
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-sm-4 control-label">启用滚动</label>
                  <div class="col-sm-8">
                    <label class="checkbox-inline">
                        <input type="radio" 
                  
                  
                      <eq name="info['isTab']" value="1">checked="checked"</eq>
                      name="isTab" value="1" id="autoPlay_0" />
                      是</label>
                    <label class="checkbox-inline">
                        <input type="radio" name="isTab" value="0" 
                  
                  
                      <eq name="info['isTab']" value="0">checked="checked"</eq>
                      id="autoPlay_1" />
                      否</label>
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-sm-4 control-label"> 自动播放</label>
                  <div class="col-sm-8">
                    <label class="checkbox-inline">
                        <input type="radio" 
                  
                  
                      <eq name="info['autoPlay']" value="1">checked="checked"</eq>
                      name="autoPlay" value="1" id="autoPlay_0" />
                      是</label>
                    <label class="checkbox-inline">
                        <input type="radio" name="autoPlay" value="0" 
                  
                  
                      <eq name="info['autoPlay']" value="0">checked="checked"</eq>
                      id="autoPlay_1" />
                      否</label>
                  </div>
                </div>
              </div>
              <div class="col-sm-6">
                <div class="form-group">
                  <label class="col-sm-4 control-label">显示个数</label>
                  <div class="col-sm-8">
                    <input name="picDisplayCount" type="text" id="picDisplayCount" value="{$info.picDisplayCount}" class="form-control" />
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-sm-4 control-label">一次滚动个数</label>
                  <div class="col-sm-8">
                    <input name="scrollCount" type="text" id="scrollCount" value="{$info.scrollCount}" class="form-control" />
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-sm-4 control-label">播放时间</label>
                  <div class="col-sm-8">
                    <input name="interTime" type="text" id="interTime" value="{$info.interTime}" class="form-control" />
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-sm-4 control-label">播放效果</label>
                  <div class="col-sm-8">
                    <select name="effect" class="form-control">
                        <option value="fade" 
                  
                  
                      <eq name="info['effect']" value="fade">selected=
                          "
                          selected
                          "</eq>
                        >
                        谈入淡出
                  
                  
                        </option>
                      
                        <option value="leftLoop" 
                  
                  
                      <eq name="info['effect']" value="leftLoop">selected=
                          "
                          selected
                          "</eq>
                        >
                        左右切换
                  
                  
                        </option>
                      
                        <option value="topLoop" 
                  
                  
                      <eq name="info['effect']" value="topLoop">selected=
                          "
                          selected
                          "</eq>
                        >
                        上下切换
                  
                  
                        </option>
                      
                    </select>
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-sm-4 control-label">显示分页</label>
                  <div class="col-sm-8">
                    <label class="checkbox-inline">
                        <input type="radio" 
                  
                  
                      <eq name="info['display_pages']" value="1">checked="checked"</eq>
                      name="display_pages" value="1" id="display_pages" />
                      是</label>
                    <label class="checkbox-inline">
                        <input type="radio" name="display_pages" value="0" 
                  
                  
                      <eq name="info['display_pages']" value="0">checked="checked"</eq>
                      id="display_pages" />
                      否</label>
                  </div>
                </div>
              </div>
            </div>
          </eq>
          <eq name="info['type']" value="9">
          
          
          
          
          
          
          
          
          <div class="row">
              <div class="col-sm-6">
               
            
            
            
            
            
            
            
            
            
            
            
            <div class="form-group">
                  <label class="col-sm-4 control-label">播放效果</label>
                  <div class="col-sm-8">
                    <select name="position" class="form-control">
                        <option value="static" 
                  <eq name="info['position']" value="static">selected=
                      "
                      selected
                      "</eq>
                    >
                    
                    默认
                  
                    
                    </option>
                  
                    <option value="top" 
                  
                  
                  <eq name="info['position']" value="top">selected=
                      
                      "
                      
                      selected
                      
                      "</eq>
                    >
                    
                    居上
                  
                    
                    </option>
                  
                    <option value="bottom" 
                  
                  
                  <eq name="info['position']" value="bottom">selected=
                      
                      "
                      
                      selected
                      
                      "</eq>
                    >
                    
                    居下
                  
                    
                    </option>
                        </option>
                      
                    </select>
                  </div>
                </div>
            
            
            
            
            
            
            
            
            
            
            
            
            
              </div>
              
              
              <div class="col-sm-6">
              <div class="form-group">
              <label class="col-sm-4 control-label">显示搜索框</label>
              <div class="col-sm-8 controls">
              <label class="checkbox-inline"> <input name="displayForm" type="radio" id="displayForm" value="1" 
                  
                  <eq name="info['displayForm']" value="1">checked="checked"</eq>
                  />
                  是</label>
                <label class="checkbox-inline"> <input name="displayForm" type="radio" id="displayForm" value="0" 
                  
                  <eq name="info['displayForm']" value="0">checked="checked"</eq>
                  />
                  否</label>
              
              
           
              </div>
            </div>
              </div>
          </div>
          
          
          
          
            
            
           
           
          </eq>
          <eq name="info['type']" value="1">
          
          
          
          
          
          
          
          
          
          
          <div class="row">
              <div class="col-sm-6">
              
              
              
              
              
             
              
              
              
                <div class="form-group">
                  <label class="col-sm-4 control-label">标题字数</label>
                  <div class="col-sm-8">
                    <input name="listTitleLength" type="text" id="listTitleLength" value="{$info.listTitleLength}" class="form-control" />
                  </div>
                </div>
                
                
                 <div class="form-group">
                  <label class="col-sm-4 control-label">显示分页</label>
                  <div class="col-sm-8">
                    <label class="checkbox-inline">
                    <input name="display_pages" type="radio" id="is_nav_8" value="0" 
                  
                  <eq name="info['display_pages']" value="1">checked="checked"</eq>
                  />
                  是</label>
                <label class="checkbox-inline">
                    <input name="display_pages" type="radio" id="is_nav_9" value="1" 
                  
                  <eq name="info['display_pages']" value="0">checked="checked"</eq>
                  />
                  否</label>
                  </div>
                </div>
                
          </div>
          
          
          
           <div class="col-sm-6">
              
              
              
              
              
              <div class="form-group">
                  <label class="col-sm-4 control-label">详情字数</label>
                  <div class="col-sm-8">
                    <input class="form-control" name="listContentLength" type="text" id="listContentLength" value="{$info.listContentLength}" />
                  </div>
                </div>
              
              
              
                <div class="form-group">
                  <label class="col-sm-4 control-label">剪切省略符</label>
                  <div class="col-sm-8">
                    <input class="form-control" name="listContentOut" type="text" id="listContentOut" value="{$info.listContentOut}" />
                  </div>
                </div>
                
                
                
                
          </div>
          
          
          
          
          
          
          
          
          
          </div>
          
          
          
          
          
          
          </eq>
          <eq name="info['type']" value="10">
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          <div class="row">
              <div class="col-sm-6">
                <div class="form-group">
                  <label class="col-sm-4 control-label">标题字数</label>
                  <div class="col-sm-8">
                    <input name="listTitleLength" type="text" id="listTitleLength" value="{$info.listTitleLength}" class="form-control" />
                  </div>
                </div>
               
                
                
                <div class="form-group">
                  <label class="col-sm-4 control-label"> 自动播放</label>
                  <div class="col-sm-8">
                    <label class="checkbox-inline">
                        <input type="radio" 
                  
                  
                      <eq name="info['autoPlay']" value="1">checked="checked"</eq>
                      name="autoPlay" value="1" id="autoPlay_0" />
                      是</label>
                    <label class="checkbox-inline">
                        <input type="radio" name="autoPlay" value="0" 
                  
                  
                      <eq name="info['autoPlay']" value="0">checked="checked"</eq>
                      id="autoPlay_1" />
                      否</label>
                  </div>
                </div>
                
                
                
                
                
                <div class="form-group">
                  <label class="col-sm-4 control-label">滚动效果</label>
                  <div class="col-sm-8">
                    <select name="effect" class="form-control">
                        <option value="fade" 
                  
                  
                      <eq name="info['effect']" value="fade">selected=
                          "
                          selected
                          "</eq>
                        >
                        谈入淡出
                  
                  
                        </option>
                      
                        <option value="leftLoop" 
                  
                  
                      <eq name="info['effect']" value="leftLoop">selected=
                          "
                          selected
                          "</eq>
                        >
                        左右切换
                  
                  
                        </option>
                      
                        <option value="topLoop" 
                  
                  
                      <eq name="info['effect']" value="topLoop">selected=
                          "
                          selected
                          "</eq>
                        >
                        上下切换
                  
                  
                        </option>
                      
                    </select>
                  </div>
                </div>
                
                
                
                
              </div>
              <div class="col-sm-6">
                <div class="form-group">
                  <label class="col-sm-4 control-label">显示个数</label>
                  <div class="col-sm-8">
                    <input name="picDisplayCount" type="text" id="picDisplayCount" value="{$info.picDisplayCount}" class="form-control" />
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-sm-4 control-label">一次滚动个数</label>
                  <div class="col-sm-8">
                    <input name="scrollCount" type="text" id="scrollCount" value="{$info.scrollCount}" class="form-control" />
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-sm-4 control-label">滚动时间</label>
                  <div class="col-sm-8">
                    <input name="interTime" type="text" id="interTime" value="{$info.interTime}" class="form-control" />
                  </div>
                </div>
                
             
              </div>
            </div>
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          </eq>
          
          <eq name="info['type']" value="14">
          
          
          
          <div class="row">
              <div class="col-sm-6">
                <div class="form-group">
                  <label class="col-sm-4 control-label">启用选项卡</label>
                  <div class="col-sm-8">
                    <label> <input type="radio" 
                  
                  
                  <eq name="info['isTab']" value="1">checked="checked"</eq>
                  name="isTab" value="1" id="autoPlay_0" />
                  是</label>
                <label> <input type="radio" name="isTab" value="0" 
                  
                  
                  <eq name="info['isTab']" value="0">checked="checked"</eq>
                  id="autoPlay_1" />
                  否</label>
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-sm-4 control-label">自动播放</label>
                  <div class="col-sm-8">
                    <label> <input type="radio" 
                  
                  
                  <eq name="info['autoPlay']" value="1">checked="checked"</eq>
                  name="autoPlay" value="1" id="autoPlay_0" />
                  是</label>
                <label> <input type="radio" name="autoPlay" value="0" 
                  
                  
                  <eq name="info['autoPlay']" value="0">checked="checked"</eq>
                  id="autoPlay_1" />
                  否</label>
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-sm-4 control-label">播放时间</label>
                  <div class="col-sm-8">
                  
                  <input type="text" class="form-control" name="interTime" value="{$info.interTime}" id="autoPlay_0" />
                  
                   
                  </div>
                </div>
                
             
              </div>
              
              
              
              
               <div class="col-sm-6">
                
                
                <div class="form-group">
                  <label class="col-sm-4 control-label">效果</label>
                  <div class="col-sm-8">
                  
                  <select name="effect" class="form-control">
                  <option value="fade" 
                  
                  
                  <eq name="info['effect']" value="fade">selected="selected"</eq>
                  >谈入淡出
                  
                  
                  </option>
                  <option value="leftLoop" 
                  
                  
                  <eq name="info['effect']" value="leftLoop">selected="selected"</eq>
                  >左右切换
                  
                  
                  </option>
                  <option value="topLoop" 
                  
                  
                  <eq name="info['effect']" value="topLoop">selected="selected"</eq>
                  >上下切换
                  
                  
                  </option>
                </select>
                  
                   
                  </div>
                </div>
                
             
              </div>
              
              
              
              
              
              
          </div>
          
          
          
            
          </eq>
          <eq name="info['type']" value="3">
            <div class="row">
              
              
              
              
             <div class="col-sm-6">
                <div class="form-group"> <div class="row">
                  <label class="col-sm-4 control-label">播放时间</label>
                  <div class="col-sm-8">
                    <input type="text" class="form-control" name="interTime" value="{$info.interTime}" />
                  </div>
                </div>
              </div></div>
              
               <div class="col-sm-6"><div class="form-group">
                <div class="row">
                  <label class="col-sm-4 control-label">播放效果</label>
                  <div class="col-sm-8">
                  <select name="effect" class="form-control">
                  <option value="fade" 
                  
                  
                  <eq name="info['effect']" value="fade">selected="selected"</eq>
                  >谈入淡出
                  
                  
                  </option>
                  <option value="leftLoop" 
                  
                  
                  <eq name="info['effect']" value="leftLoop">selected="selected"</eq>
                  >左右切换
                  
                  
                  </option>
                  <option value="topLoop" 
                  
                  
                  <eq name="info['effect']" value="topLoop">selected="selected"</eq>
                  >上下切换
                  
                  
                  </option>
                </select>
                  
                   
                  </div>
                </div>
              </div></div>
              
              
              
              
              
              <div class="col-sm-6">
               <div class="form-group"> <div class="row">
                  <label class="col-sm-4 control-label">显示个数</label>
                  <div class="col-sm-8">
                    <input name="picDisplayCount" class="form-control" type="text" id="picDisplayCount" value="{$info.picDisplayCount}" />
                  </div>
                </div></div>
              </div>
              
              
              
              <div class="col-sm-6">
                <div class="form-group"><div class="row">
                  <label class="col-sm-4 control-label">自动播放</label>
                  <div class="col-sm-8">
                    <label class="checkbox-inline">
                        <input name="autoPlay" type="radio" id="autoPlay" value="1" 
                  
                      <eq name="info['autoPlay']" value="1">checked="checked"</eq>
                      />
                      是</label>
                    <label class="checkbox-inline">
                        <input name="autoPlay" type="radio" id="autoPlay" value="0" 
                  
                      <eq name="info['autoPlay']" value="0">checked="checked"</eq>
                      />
                      否</label>
                  </div>
                </div>
              </div></div>
              
              
            </div>
           
              
          
                
                
                
           
              <div id="replyList">
              
              <volist name="banner" id="vo">
                  <div class="col-sm-6 col-md-4">
                    <div class="thumbnail"> <a href="javascript:void(0);">
                      <input type="hidden" name="img_path[]" value="{$vo.img_url}" />
                      <img src="<notempty name="vo['img_url']">{:getThumbPath($vo['img_url'])}
                      <else/>
                      __PUBLIC__/Admin/images/defaultimg.png
                      </notempty>
                      " onclick="showImgBox(this);" height="40" width="40" /></a>
                      <div class="caption">
                        <p>
                          <input placeholder="标题" type="text" class="form-control" name="bannertitle[]" value="{$vo.title}" />
                        </p>
                        <div><p>
                          <textarea placeholder="链接" type="text" name="link[]" class="form-control">{$vo.link}</textarea>
                          <a class="btn btn-success btn-sm" style="width:100%; margin-top:5px;" onClick="showLinkBox(this);" href="javascript:void(0);">点击选择链接</a>
                        </p></div>
                        <p><a class="glyphicon glyphicon-trash" href="javascript:void(0);" onclick="delnews(this);"></a>&nbsp;&nbsp;&nbsp;<a href="javascript:void(0);" class="glyphicon glyphicon-arrow-left" onclick="after(this);"></a>&nbsp;&nbsp;&nbsp;<a href="javascript:void(0);" onclick="append(this);" class="glyphicon glyphicon-arrow-right"></a></p>
                      </div>
                    </div>
                  </div>
                </volist>
                
                
                </div>
          <button type="button" class="btn btn-success" onClick="addnews();">添加</button>
            
           
          </eq>
          <eq name="info['type']" value="0">
          
          

          <empty name="info['diysource']">
            <div><html:editor id="editor" name="content" type="UEDIT" style="">{$info.content}</html:editor></div>
            </empty>
            
            
            
             
            
            
            
            
          </eq>
          <eq name="info['type']" value="5">
            <html:editor id="editor" name="content" type="CHENHUIEDITOR" style="height:400px; width:100%">{$info.content}</html:editor>
          </eq>
        
      </div>
      
      
      
      
      
      
      
      <div  class="optionBox container" style="display:none; width:100%;"> 
        
        <!-- 边框 -->
        
        <eq name="info['type']" value="0">
          <div class="form-group">
            <div class="col-sm-12">
              <textarea class="form-control" placeholder="自定义HTML" name="diysource" style="width:100%;" rows="10">{$info.diysource}</textarea>
            </div>
          </div>
        </eq>
        <div class="form-group">
          <div class="col-sm-12">
            <textarea class="form-control" placeholder="自定义样式" id="styleBox" name="style" style="width:100%;" rows="10">{$info.style}</textarea>
          </div>
        </div>
        
        <if condition="getAccessMenu($accessList, 'Admin', 'Pages', 'cssedit')">
      
        <div class="form-group">
          <div class="col-sm-12">
            <a class="btn btn-success" onClick="showcssedit({$info.id}, '{$info.title}');">CSS编辑器</a>
          </div>
        </div>
        
        </if>
        
        
      </div>
      <notempty name="stylelist">
        <div  class="optionBox container" style="display:none; width:100%;">
          <div class="alert alert-warning" role="alert">单击选择一个样式然后按"保存"</div>
          <div class="row stylelist">
            <volist name="stylelist" id="vo">
              <div class="col-sm-3 col-xs-12 col-md-3">
                <div class="thumbnail"> <img src="{:getThumbPath($vo['img_url'])}" alt="">
                  <input type="hidden" disabled name="style" value="{$vo.content}">
                   
                  <input type="hidden" disabled name="diysource_" value="{:base64_encode(base64_encode($vo['diysource']))}">
                  
                </div>
              </div>
            </volist>
          </div>
        </div>
      </notempty>
      <div class="optionBox" style="display:none;">
        <div class="row">
          <div class="col-sm-6">
            <div class="form-group">
              <label class="col-sm-4 control-label">标题字数</label>
              <div class="col-sm-8">
                <input name="title" type="text" id="title" class="form-control" value="{$info.title}" />
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-4 control-label">更多的链接</label>
              <div class="col-sm-8">
                <input name="titleDisplayMore" type="text" id="titleDisplayMore" class="form-control" value="{$info.titleDisplayMore}" />
              </div>
            </div>
          </div>
          <div class="col-sm-6">
            <div class="form-group">
              <label class="col-sm-4 control-label">显示标题</label>
              <div class="col-sm-8">
                <label class="checkbox-inline"> <input name="display_title" type="radio" id="is_nav_8" value="1" 
                  
                  <eq name="info['display_title']" value="1">checked="checked"</eq>
                  />
                  是</label>
                <label class="checkbox-inline"> <input name="display_title" type="radio" id="is_nav_9" value="0" 
                  
                  <eq name="info['display_title']" value="0">checked="checked"</eq>
                  />
                  否</label>
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-4 control-label">更多文字</label>
              <div class="col-sm-8">
                <input name="titleMoreText" type="text" id="titleMoreText" class="form-control" value="{$info.titleMoreText}" />
              </div>
            </div>
          </div>
        </div>
        
        <!--- 基础---> 
        
      </div>
      
      <!-- 显示数据 -->
      <div class="optionBox" style="display:none;">
        <if condition="in_array($info['type'],array(12,13))">
        
        <style>
		  .ui-sortable.selectlist.ajaxbinded .selected{border:1px solid #f00;}}
		  </style>
        <assign name="mmap['modules_id']" value="$info['id']" />
        
         <!--<iframe src="{:U('Category/selectCategory',array('modules_id' => $info['id']))}" frameborder="0" height="300" width="100%"></iframe>-->
          
          
          
          
          
          <ul id="CategoryList_">
            <volist name="newsList" id="vo">
              <li sortkey="{$key}" id="news{$vo.module}_{$vo.id}" style="text-align:left;">[<a href="javascript:void(0);" onclick="sortListInfo('up',this)"><i class="glyphicon glyphicon-arrow-up"></i></a> <a href="javascript:void(0);" onclick="sortListInfo('down',this)"><i class="glyphicon glyphicon-arrow-down"></i></a>] {$vo.title}<a href="javascript:;" onClick="removeListInfoCate({$vo.id},{$vo.module});" style="font-size:20px; height:24px; width:24px; line-height:24px; text-align:center; display:inline-block; color:#fff; background:#f00; border-radius:20px;">×</a>
                <input type="hidden" name="modulesContent[]" value="{$vo.module}_{$vo.id}">
              </li>
            </volist>
          </ul>
          
          
          
          
          
          
          
          
          <div class="row">
               <div class="col-xs-6 <if condition="!getAccessMenu($accessList, 'Admin', 'Category', 'selectCategory')">hidden</if>"><html:dropdownselect class="newsselect" name="modulesContent" style="height:auto; width:auto;" multi="1" action="{:U('Category/selectCategory', $mmap)}"  title="选择栏目" /></div>
               
               
               <div class="col-xs-6 <if condition="!getAccessMenu($accessList, 'Admin', 'Product_category', 'selectCategory')">hidden</if>"><html:dropdownselect class="productselect" name="modulesContentp" style="height:auto; width:auto;" multi="1" action="{:U('Product_category/selectCategory',$mmap)}"  title="选择商品分类" /></div>
          </div>
          
          <script>
			var newslisthtml = $('#CategoryList_').html();
			//$(newslisthtml).appendTo('.newsselect');
			document.getElementsByClassName('newsselect').item(0).innerHTML = '<span class="placeholder" style="cursor:pointer">选择栏目</span>'+newslisthtml;
			$('.newsselect').find('li').hide();
			$('.newsselect').find('input[type="hidden"]').attr('name', 'modulesContent_id[]');
			
		    $('.newsselect').blur(function(e){
				var htmlret = $(this).html();
				document.getElementById('CategoryList_').innerHTML = htmlret;
				$('#CategoryList_').find('input[type="hidden"]').attr('name', 'modulesContent[]');
				$('#CategoryList_').find('.placeholder').remove();
				$('#CategoryList_').find('li').show();
				
				
				
				
				
				var newslisthtml = $('#CategoryList_').html();
				//$(newslisthtml).appendTo('.newsselect');
				document.getElementsByClassName('productselect').item(0).innerHTML = '<span class="placeholder" style="cursor:pointer">选择商品分类</span>'+newslisthtml;
				$('.productselect').find('li').hide();
				$('.productselect').find('input[type="hidden"]').attr('name', 'modulesContentp_id[]');
					
					//$(this).children('li').appendTo('#NewsList_');
				});
			
			
			var newslisthtml = $('#CategoryList_').html();
			//$(newslisthtml).appendTo('.newsselect');
			document.getElementsByClassName('productselect').item(0).innerHTML = '<span class="placeholder" style="cursor:pointer">选择商品分类</span>'+newslisthtml;
			$('.productselect').find('li').hide();
			$('.productselect').find('input[type="hidden"]').attr('name', 'modulesContentp_id[]');
			
		    $('.productselect').blur(function(e){
				var htmlret = $(this).html();
				document.getElementById('CategoryList_').innerHTML = htmlret;
				$('#CategoryList_').find('input[type="hidden"]').attr('name', 'modulesContent[]');
				$('#CategoryList_').find('.placeholder').remove();
				$('#CategoryList_').find('li').show();
				
				 
				
				
				var newslisthtml = $('#CategoryList_').html();
				//$(newslisthtml).appendTo('.newsselect');
				document.getElementsByClassName('newsselect').item(0).innerHTML = '<span class="placeholder" style="cursor:pointer">选择栏目</span>'+newslisthtml;
				$('.newsselect').find('li').hide();
				$('.newsselect').find('input[type="hidden"]').attr('name', 'modulesContent_id[]');
                //$(this).children('li').appendTo('#NewsList_');
            });
		  </script>
          
          
          
          
          
          
          
          
        </if>
        <if condition="in_array($info['type'],array(1,2,10))">
          <!--<iframe src="{:U('News/selectNews',array('modules_id' => $info['id']))}" frameborder="0" height="300" width="100%"></iframe>-->
          
          <assign name="mmap['modules_id']" value="$info['id']" />
          
          
          
          
          
          
          <ul id="NewsList_">
            <volist name="newsList" id="vo">
              <li sortkey="{$key}" id="news{$vo.module}_{$vo.id}" style="border:1px solid #ccc; width:100px; position:relative; height:100px; margin:4px; float:left;"> <img src="{:getThumbPath($vo['img_url'])}" width="100%" height="100%"><a href="javascript:void(0);" onclick="sortListInfo('up',this)" style="position:absolute; left:0px; bottom:0px;">[<i class="glyphicon glyphicon-arrow-left"></i>]</a> <a href="javascript:void(0);" onclick="sortListInfo('down',this)" style="position:absolute; bottom:0px; right:0px;">[<i class="glyphicon glyphicon-arrow-right"></i>]</a> <a href="javascript:;" onClick="removeListInfoCate({$vo.id},{$vo.module});" style="font-size:20px; height:24px; width:24px; line-height:24px; text-align:center; position:absolute; top:0px; right:0px; color:#fff; background:#f00; border-radius:20px;">×</a>
                <input type="hidden" name="modulesContent[]" value="{$vo.module}_{$vo.id}">
              </li>
            </volist>
			
			
            
            
            
			
          
          
          </ul>
          <div class="clearfix"></div>
          
          <style>
		  .ui-sortable.selectlist.ajaxbinded .selected{border:1px solid #f00;}}
		  </style>
          
          <div class="row">
               <div class="col-xs-6 <if condition="!getAccessMenu($accessList, 'Admin', 'News', 'selectNews')">hidden</if>"><html:dropdownselect class="newsselect" name="modulesContent" style="height:auto; width:auto;" multi="1" action="{:U('News/selectNews', $mmap)}"  title="选择文章" />
               <a href="##" style="width:100%; display:inline-block; margin-top:5px;" onClick="_openWindow('<?php echo U('News/add');?>', 800, '发布文章', '保存', function(){ }, '');" class="btn btn-success">发布文章</a>
               </div>
               
               
               <div class="col-xs-6 <if condition="!getAccessMenu($accessList, 'Admin', 'Product', 'selectNews')">hidden</if>"><html:dropdownselect class="productselect" name="modulesContentp" style="height:auto; width:auto;" multi="1" action="{:U('Product/selectNews',$mmap)}"  title="选择商品" />
               <a href="##" style="width:100%; display:inline-block; margin-top:5px;" onClick="_openWindow('<?php echo U('Product/add');?>', 800, '发布商品', '保存', function(){ }, '');" class="btn btn-success">发布商品</a>
               </div>
          </div>
          
          <script>
			var newslisthtml = $('#NewsList_').html();
			//$(newslisthtml).appendTo('.newsselect');
			document.getElementsByClassName('newsselect').item(0).innerHTML = '<span class="placeholder" style="cursor:pointer">点击选择已有文章</span>'+newslisthtml;
			$('.newsselect').find('li').hide();
			$('.newsselect').find('input[type="hidden"]').attr('name', 'modulesContent_id[]');
			
		    $('.newsselect').blur(function(e){
				var htmlret = $(this).html();
				document.getElementById('NewsList_').innerHTML = htmlret;
				$('#NewsList_').find('input[type="hidden"]').attr('name', 'modulesContent[]');
				$('#NewsList_').find('.placeholder').remove();
				$('#NewsList_').find('li').show();
				var newslisthtml = $('#NewsList_').html();
				//$(newslisthtml).appendTo('.newsselect');
				document.getElementsByClassName('productselect').item(0).innerHTML = '<span class="placeholder" style="cursor:pointer">点击选择已有商品</span>'+newslisthtml;
				$('.productselect').find('li').hide();
				$('.productselect').find('input[type="hidden"]').attr('name', 'modulesContentp_id[]');
					
					//$(this).children('li').appendTo('#NewsList_');
				});
			
			
			var newslisthtml = $('#NewsList_').html();
			//$(newslisthtml).appendTo('.newsselect');
			document.getElementsByClassName('productselect').item(0).innerHTML = '<span class="placeholder" style="cursor:pointer">点击选择已有商品</span>'+newslisthtml;
			$('.productselect').find('li').hide();
			$('.productselect').find('input[type="hidden"]').attr('name', 'modulesContentp_id[]');
			
		    $('.productselect').blur(function(e){
				var htmlret = $(this).html();
				document.getElementById('NewsList_').innerHTML = htmlret;
				$('#NewsList_').find('input[type="hidden"]').attr('name', 'modulesContent[]');
				$('#NewsList_').find('.placeholder').remove();
				$('#NewsList_').find('li').show();
				
				
				
				 
				var newslisthtml = $('#NewsList_').html();
				//$(newslisthtml).appendTo('.newsselect');
				document.getElementsByClassName('newsselect').item(0).innerHTML = '<span class="placeholder" style="cursor:pointer">点击选择已有文章</span>'+newslisthtml;
				$('.newsselect').find('li').hide();
				$('.newsselect').find('input[type="hidden"]').attr('name', 'modulesContent_id[]');
                //$(this).children('li').appendTo('#NewsList_');
            });
		  </script>
        </if>
      </div>
     
    </form>





<if condition="!empty($pasteList) || !empty($tsubList)">
      <div  class="optionBox container" style="display:none; width:100%;"> 
      <notempty name="tsubList">
      <table class="table table-bordered" class="subListBox" width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td colspan="2" align="left"><div class="row">
            <volist name="tsubList" id="vo">
              <div class="col-sm-2 col-md-2 col-xs-4">
                <div class="thumbnail">
                  <form class="checkoutformaddmodule" action="{:U('addModules')}" method="post">
                    <input type="hidden" name="type" value="{$vo.type}" />
                    <input type="hidden" name="filename" value="{$vo.filename}" />
                    <input type="hidden" name="title" value="{$vo.title}" />
                    <input type="hidden" name="img_url" value="{$vo.img_url}" />
                    <input type="hidden" name="pid" value="{$info.id}" />
                    <input type="hidden" name="width" value="200px" />
                    <input type="hidden" name="templatefilename" value="{$info.templatefilename}" />
                    <img src="{:getThumbPath($vo['img_url'])}" width="100%" onclick="$(this).parent().submit();" />
                  </form>
                  <div class="caption">
                    <p>{$vo.title}</p>
                  </div>
                </div>
              </div>
            </volist>
          </div></td>
      </tr>
      </table>
    </notempty>
    <notempty name="pasteList">
      <table class="table table-bordered" class="subListBox" width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td colspan="2" align="left"><div class="row">
            <volist name="pasteList" id="vo">
              <div class="col-sm-2 col-md-2">
                <div class="thumbnail">
                  <form class="checkoutformaddmodule" action="{:U('pasteModules')}" method="post">
                    <input type="hidden" name="id" value="{$vo.id}" />
                    <input type="hidden" name="pid" value="{$info.id}" />
                    <img src="{:getThumbPath($vo['img_url'])}" width="100%" onclick="$(this).parent().submit();" />
                  </form>
                  <div class="caption">
                    <p>{$vo.title}</p>
                  </div>
                </div>
              </div>
            </volist>
          </div></td>
      </tr>
      </table>
    </notempty>
    
   
            <div id="subListBox" style="border:1px solid #ccc; background:#fff;">
                  <volist name="subList" id="vo">
                    <div style="border:1px solid #ccc; width:100px; margin:4px; float:left;"><img src="{:getThumbPath($vo['img_url'])}" width="100%" height="100%"> <p>{$vo.title}</p> </div>
                  </volist>
                  <div style="clear:both;"></div>
                </div>
        
    
    </div></if>







<eq name="info['type']" value="3">
  <div class="row" id="copyHTML" style="display:none;">
    <div class="col-sm-6 col-md-4 ">
      <div class="thumbnail"> <a href="javascript:void(0);">
        <input type="hidden" name="img_path[]" />
        <img src="<notempty name="info['img_path']">{:getThumbPath($info['img_path'])}
        <else/>
        __PUBLIC__/Admin/images/defaultimg.png
        </notempty>
        " onclick="showImgBox(this);" height="40" width="40" /></a>
        <div class="caption">
          <p>
            <input placeholder="标题" type="text" class="form-control" name="bannertitle[]" />
          </p>
          <div><p>
            <textarea placeholder="链接" type="text" name="link[]" class="form-control"></textarea>
            <a class="btn btn-success btn-sm" style="width:100%; margin-top:5px;" onClick="showLinkBox(this);" href="javascript:void(0);">点击选择链接</a>
          </p></div>
          <p><a class="glyphicon glyphicon-trash" href="javascript:void(0);" onclick="delnews(this);"></a>&nbsp;&nbsp;&nbsp;<a href="javascript:void(0);" class="glyphicon glyphicon-arrow-left" onclick="after(this);"></a>&nbsp;&nbsp;&nbsp;<a href="javascript:void(0);" onclick="append(this);" class="glyphicon glyphicon-arrow-right"></a></p>
        </div>
      </div>
    </div>
  </div>
  <script>
	function after(e){
	    $(e).parent().parent().parent().parent().after($(e).parent().parent().parent().parent().prev());
    }
    function append(e){
	    $(e).parent().parent().parent().parent().next().after($(e).parent().parent().parent().parent());
    }
	function delnews(e){
		$(e).parent().parent().parent().parent().remove();
	}
	function addnews(){
		var html = $('#copyHTML').html();
		$($.parseHTML(html)).appendTo('#replyList');
	}
</script>
  <style>
  #replyList p{padding:4px;}
  #replyList input[type="text"], #replyList textarea{width:100%;}
  	#replyList ul li{margin-top:5px; background:#eee; padding:8px; width:700px;}
	.delnews{display:block; width:30px; font-size:20px; height:30px; border-radius:15px; background:#f00; color:#fff; line-height:30px; text-align:center;}
  </style>
</eq>
<style>
.input-group{margin:4px 0;}
</style>




<script>









function _openWindow(url, width, title, buttontitle, callback, source){
		var lock = true;
		var height = $(window).height() - 200;
		<if condition="isMobile()">
			width = '100%';
			lock = false;
			var height = $(window).height() - 45;
		</if>
		var mydialog = art.dialog.load(url,{init:function(){
		<if condition="isMobile()">
			$('.aui_state_focus').addClass('auii_statei_focus');
			$(mydialog.DOM.outer[0]).find('.aui_titleBar button').each(function(index, element) {
                $(this).click(function(e){
					
                    $(mydialog.DOM.outer[0]).find('.aui_buttons button').eq(index).trigger('click');
					
                });
            });
			$(mydialog.DOM.outer[0]).find('.aui_main').height($(window).height() - 90);
		<else/>
			$('.aui_state_focus').addClass('auii_statei_focus');
			if($(mydialog.DOM.outer[0]).find('.aui_main').height() > $(window).height() - 100){
				$(mydialog.DOM.outer[0]).find('.aui_main').height($(window).height() - 200);
			}
			mydialog._reset();
		</if>
			var niceScroll = $(mydialog.DOM.outer[0]).find(".aui_main").niceScroll({scrollspeed:20,styler:"fb",cursorcolor:"#65cea7", cursorwidth: '3', cursorborderradius: '0px', background: '#424f63', spacebarenabled:false, cursorborder: '0'});	
			$(mydialog.DOM.outer[0]).find(".aui_main").click(function(e) {
				$('#'+niceScroll.id).css('z-index', $('#'+niceScroll.id).css('z-index')*1+2);
			});
			$(mydialog.DOM.outer[0]).find(".checkoutform:eq(0)").Validform({
				ajaxPost:true,
				tiptype:function(msg, s, data){
					if(s.type == 1){
						$.ThinkBox.success('正在处理，请稍等……',{'delayClose':500,modal:false, 'close': '关闭',x:0,y:0,center:false,locate:['left','top'], show:['',0]});
						
					}
					if(s.type == 3){
					$.ThinkBox.error(msg,{'delayClose':500,modal:false, 'close': '关闭',x:0,y:0,center:false,locate:['left','top'], show:['',0]});
				}
				},
				datatype:{
					"text":function(gets,obj,curform,regxp){
						return true;
					},"image":function(gets,obj,curform,regxp){
						return true;
					}
				},
				callback:function(data){
					//检测登录 
					$('.ThinkBox-close').trigger('click');
					if(data.status == 0){
						$.ThinkBox.error(data.info,{'delayClose':500,modal:false, 'close': '关闭',x:0,y:0,center:false,locate:['left','top'], show:['',0]});
					}else{
						if(callback != null){
							callback();
						} 
						mydialog.close();
					}
				}
			});
			 
		},width: width, height: 'auto',fixed:true,lock:lock,title:title,ok:function(){
			$(mydialog.DOM.outer[0]).find('.checkoutform:eq(0)').submit();
			if($(mydialog.DOM.outer[0]).find(".checkoutform").length > 0){
				return false;
			}else{if(callback != null){
				callback();
				mydialog.close(); 
				return false;
			}
		}
		},okVal:buttontitle,close:function(){
			$(mydialog.DOM.outer[0]).find(".aui_main").getNiceScroll().remove();
			$(mydialog.DOM.outer[0]).find('.ueditorelement').each(function(index, element) {
                UE.getEditor($(this).attr('id')).destroy(); 
            });
		}});
	}




$(window).trigger('load');
function showcssedit(modulesID,title){
art.dialog.open('<?php echo U('Admin/Pages/cssedit');?>?cssPath=.myBox{id}&modules_id='+modulesID, {width: '315px', height: '450px',title:title+'-编辑样式',lock: true,
		close: function () {
                
            },ok:function(){
			var d = this.iframe.contentWindow.document;
			var css = $(d).find('#target').attr('style');
			var cssPath_value = $(d).find('#cssPath_value').val();
			$.post(
			'<?php echo U('Admin/Modules/saveCss');?>',
			{'media':$(d).find('#media_value').val(),'css':css, 'modules_id':modulesID,'csspath':'.myBox{id}'+cssPath_value.replace('.myBox{id}','')},
			function(data){
				if(data.status == 1){
					$("#styleBox").val(data.data);
				}
				
			},'json');
		}});

}
function showImgBox(curElement){
	art.dialog.data('curElement',curElement);
	
	<if condition="!isMobile()">
	
	art.dialog.open('{:U('Img/imagesBox')}', {width: 800, height: 500,lock:true,title:'选择图片', ok:function(){
			var d = this.iframe.contentWindow.document;
			var img_url = $(d).find('#Imgselected').attr('img_url');
			$(curElement).parent().find("input").eq(0).val(img_url);
			$(curElement).val('__PUBLIC__'+img_url);
			$(curElement).focus();
			$(curElement).blur(); 
			curElement.src = '__PUBLIC__'+img_url;
	}});
	<else/>
	mydialog.open("{:U('Img/imagesBox')}", {
		width:$(window).width(), id:'imagesBox', height: 300,lock:true,title:'上传图片',yesClose:false, ok:function(){
		var d = this.iframe.contentWindow.document;
		
		
		if($(d).find('#Imgselected').length > 0){
			var img_url = $(d).find('#Imgselected').attr('img_url');
			$(curElement).parent().find("input").eq(0).val(img_url);
			$(curElement).val('__PUBLIC__'+img_url);
			$(curElement).focus();
			$(curElement).blur();
			curElement.src = '__PUBLIC__'+img_url;
			mydialog.list['imagesBox'].close();
			return false;
		}
		
		
		$.post(
		"{:U('Img/Jcrop')}",
		{	type:$(d).find('#type').val(),
			x:$(d).find('#x').val(),
		    y:$(d).find('#y').val(),
			w:$(d).find('#w').val(),
			h:$(d).find('#h').val(),
			src:$(d).find('#img_src').val()
			},
			function(data){
			if(data == 'OK'){
				
				var img_url = $(d).find('#img_src').val().replace('__PUBLIC__', '');
				$(curElement).parent().find("input").eq(0).val(img_url);
				$(curElement).val(img_url);
				$(curElement).focus();
				$(curElement).blur();
				curElement.src = '__PUBLIC__'+img_url;
				
				mydialog.list['imagesBox'].close();
			}
		}
		); 
	}});
	</if>
}

			 
//链接选择框
function showLinkBox(curElement){
	art.dialog.data('curElement',curElement);
	art.dialog.open('{:U('Index/showLink')}', {width: 800, height: 500,lock:true,title:'选择链接'});
}


</script>